package com.revenant.driver.adapter.Driver;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.revenant.driver.R;
import com.revenant.driver.bean.AreaShowBean;
import com.revenant.driver.bean.Driver.CarManageListBean;

/**
 * @ProjectName: Shipper
 * @Package: com.revenant.shipper.adapter
 * @ClassName: MineBigItemAdapter
 * @Description: java类作用描述
 * @Author: revenant
 * @CreateDate: 2019-12-30 14:18
 * @UpdateUser: 更新者
 * @UpdateDate: 2019-12-30 14:18
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class CarManageAdapter extends BaseQuickAdapter<CarManageListBean.DataBean.ResultBean, BaseViewHolder> {

    public CarManageAdapter() {
        super(R.layout.item_car_verhticl_manage);
    }

    @Override
    protected void convert(BaseViewHolder helper, CarManageListBean.DataBean.ResultBean item) {
        helper.setText(R.id.car_num, "车牌号:" + item.getVehicleNumber());
            switch (item.isStatus()) {
                case 0:
                    helper.setGone(R.id.type, true);
                    helper.setGone(R.id.callphone, true);
                    helper.setText(R.id.type, "未审核");
                    helper.setGone(R.id.delete, false);
                    helper.setGone(R.id.edit, false);
                    break;
                case 1:
//                    helper.setGone(R.id.type, true);
//                    helper.setText(R.id.type, "审核成功");

                    helper.setGone(R.id.delete, true);

                    helper.setGone(R.id.edit, true);
                    helper.setText(R.id.edit, "编辑");
                    helper.setGone(R.id.type, false);

                    helper.setGone(R.id.callphone, false);
                    helper.addOnClickListener(R.id.delete);

                    break;
                case 2:
                    helper.setGone(R.id.type, true);
                    helper.setGone(R.id.edit, true);
                    helper.setText(R.id.edit, "重新认证");
                    helper.setText(R.id.type, "失败");
                    helper.setGone(R.id.delete, false);
                    helper.setGone(R.id.callphone, false);
                    break;

//            }

        }


    }
}
